$
d[1] =  Event[THIS].Id * 100; // sound ID

$
// Define VOLUME parameters
d[d[1]+13] = 10; // Min. volume
d[d[1]+14] = 100; // Max. volume
d[d[1]+15] = 1; // Min. random increment
d[d[1]+16] = 5; // Max. random increment
d[d[1]+17] = 5; // Probability of spontaneous value change
d[d[1]+18] = 5; // Probability of spontanoeus direction change

d[d[1]+11] = Math.Rand(d[d[1]+13], d[d[1]+14]); // Initial volume
if(Math.Rand(0,1) == 1) // Initial direction of change
  d[d[1]+12] = 1;
else
  d[d[1]+12] = -1;
endif;

$
// Define TEMPO parameters
d[d[1]+23] = 98; // Min. tempo
d[d[1]+24] = 102; // Max. tempo
d[d[1]+25] = 0; // Min. random increment
d[d[1]+26] = 0; // Max. random increment
d[d[1]+27] = 100; // Probability of spontaneous value change
d[d[1]+28] = 0; // Probability of spontanoeus direction change

d[d[1]+21] = Math.Rand(d[d[1]+23], d[d[1]+24]); // Initial tempo
d[d[1]+22] = 0; // Initial direction of change

$
// Define BALANCE parameters
d[d[1]+33] = 0; // Min. balance
d[d[1]+34] = 100; // Max. balance
d[d[1]+35] = 1; // Min. random increment
d[d[1]+36] = 5; // Max. random increment
d[d[1]+37] = 10; // Probability of spontaneous value change
d[d[1]+38] = 10; // Probability of spontanoeus direction change

d[d[1]+31] = Math.Rand(d[d[1]+33], d[d[1]+34]); // Initial balance
if(Math.Rand(0,1) == 1) // Initial direction of change
  d[d[1]+32] = 1;
else
  d[d[1]+32] = -1;
endif;

$
// Define WAIT range
d[d[1]+41] = 5; // Min. wait
d[d[1]+42] = 20; // Max. wait
